import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { IsNotEmpty } from 'class-validator';

@Entity()
export class Lucky{
  
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  @IsNotEmpty()
  userId: string;

  @Column()
  @IsNotEmpty()
  luckId: string; //抽奖信息表Id

  @Column()
  @IsNotEmpty()
  datetime: string;

  @Column("int", {
		default: () => "'0'",
	})
  isLucky: boolean; //是否中奖

  @Column("int", {
		default: () => "'0'",
	})
  type: boolean;//中奖类型 frist secend
}